/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.klikmee.sms.core.model;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 
 * @author makcro
 */
@Entity
@Table(name = "servicechargingcategory")
@NamedQueries({
		@NamedQuery(name = "ServiceChargingCategory.findAll", query = "SELECT s FROM ServiceChargingCategory s"),
		@NamedQuery(name = "ServiceChargingCategory.findById", query = "SELECT s FROM ServiceChargingCategory s WHERE s.id = :id"),
		@NamedQuery(name = "ServiceChargingCategory.findByName", query = "SELECT s FROM ServiceChargingCategory s WHERE s.name = :name"),
		@NamedQuery(name = "ServiceChargingCategory.findBySubscription", query = "SELECT s FROM ServiceChargingCategory s WHERE s.subscription = :bulk"),
		@NamedQuery(name = "ServiceChargingCategory.findByMTSChargingCode", query = "SELECT s FROM ServiceChargingCategory s WHERE s.mTSChargingCode = :mTSChargingCode"),
		@NamedQuery(name = "ServiceChargingCategory.findByVipChargingCode", query = "SELECT s FROM ServiceChargingCategory s WHERE s.vipChargingCode = :vipChargingCode"),
		@NamedQuery(name = "ServiceChargingCategory.findByTelenorChargingCode", query = "SELECT s FROM ServiceChargingCategory s WHERE s.telenorChargingCode = :telenorChargingCode"),
		@NamedQuery(name = "ServiceChargingCategory.findByTelenorServiceName", query = "SELECT s FROM ServiceChargingCategory s WHERE s.telenorServiceName = :telenorServiceName"),
		@NamedQuery(name = "ServiceChargingCategory.findByMTSChargingCodeDesc", query = "SELECT s FROM ServiceChargingCategory s WHERE s.mTSChargingCodeDesc = :mTSChargingCodeDesc"),
		@NamedQuery(name = "ServiceChargingCategory.findByVipChargingCodeDesc", query = "SELECT s FROM ServiceChargingCategory s WHERE s.vipChargingCodeDesc = :vipChargingCodeDesc"),
		@NamedQuery(name = "ServiceChargingCategory.findByTelenorChargingCodeDesc", query = "SELECT s FROM ServiceChargingCategory s WHERE s.telenorChargingCodeDesc = :telenorChargingCodeDesc"),
		@NamedQuery(name = "ServiceChargingCategory.findByMTSTheirPercent", query = "SELECT s FROM ServiceChargingCategory s WHERE s.mTSTheirPercent = :mTSTheirPercent"),
		@NamedQuery(name = "ServiceChargingCategory.findByMTSOutPercent", query = "SELECT s FROM ServiceChargingCategory s WHERE s.mTSOutPercent = :mTSOutPercent"),
		@NamedQuery(name = "ServiceChargingCategory.findByMTSClientPercent", query = "SELECT s FROM ServiceChargingCategory s WHERE s.mTSClientPercent = :mTSClientPercent"),
		@NamedQuery(name = "ServiceChargingCategory.findByTelenorTheirPercent", query = "SELECT s FROM ServiceChargingCategory s WHERE s.telenorTheirPercent = :telenorTheirPercent"),
		@NamedQuery(name = "ServiceChargingCategory.findByTelenorOurPercent", query = "SELECT s FROM ServiceChargingCategory s WHERE s.telenorOurPercent = :telenorOurPercent"),
		@NamedQuery(name = "ServiceChargingCategory.findByTelenorClientPercent", query = "SELECT s FROM ServiceChargingCategory s WHERE s.telenorClientPercent = :telenorClientPercent"),
		@NamedQuery(name = "ServiceChargingCategory.findByVipTheirPercent", query = "SELECT s FROM ServiceChargingCategory s WHERE s.vipTheirPercent = :vipTheirPercent"),
		@NamedQuery(name = "ServiceChargingCategory.findByVipOurPercent", query = "SELECT s FROM ServiceChargingCategory s WHERE s.vipOurPercent = :vipOurPercent"),
		@NamedQuery(name = "ServiceChargingCategory.findByVipClientPercent", query = "SELECT s FROM ServiceChargingCategory s WHERE s.vipClientPercent = :vipClientPercent"),
		@NamedQuery(name = "ServiceChargingCategory.findByMTSPrice", query = "SELECT s FROM ServiceChargingCategory s WHERE s.mTSPrice = :mTSPrice"),
		@NamedQuery(name = "ServiceChargingCategory.findByTelenorPrice", query = "SELECT s FROM ServiceChargingCategory s WHERE s.telenorPrice = :telenorPrice"),
		@NamedQuery(name = "ServiceChargingCategory.findByVIPPrice", query = "SELECT s FROM ServiceChargingCategory s WHERE s.vIPPrice = :vIPPrice") })
public class ServiceChargingCategory implements Serializable {
	private static final long		serialVersionUID	= 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	@Column(name = "Id", nullable = false)
	private Long					id;
	@Column(name = "Name", length = 512)
	private String					name;
	@Column(name = "Subscription")
	private Boolean					subscription;
	@Column(name = "MTSChargingCode", length = 100)
	private String					mTSChargingCode;
	@Column(name = "VipChargingCode", length = 100)
	private String					vipChargingCode;
	@Column(name = "TelenorChargingCode", length = 100)
	private String					telenorChargingCode;
	@Column(name = "TelenorServiceName", length = 100)
	private String					telenorServiceName;
	@Column(name = "MTSChargingCodeDesc", length = 1000)
	private String					mTSChargingCodeDesc;
	@Column(name = "VipChargingCodeDesc", length = 1000)
	private String					vipChargingCodeDesc;
	@Column(name = "TelenorChargingCodeDesc", length = 1000)
	private String					telenorChargingCodeDesc;
	@Column(name = "MTSTheirPercent", precision = 22)
	private Double					mTSTheirPercent;
	@Column(name = "MTSOutPercent", precision = 22)
	private Double					mTSOutPercent;
	@Column(name = "MTSClientPercent", precision = 22)
	private Double					mTSClientPercent;
	@Column(name = "TelenorTheirPercent", precision = 22)
	private Double					telenorTheirPercent;
	@Column(name = "TelenorOurPercent", precision = 22)
	private Double					telenorOurPercent;
	@Column(name = "TelenorClientPercent", precision = 22)
	private Double					telenorClientPercent;
	@Column(name = "VipTheirPercent", precision = 22)
	private Double					vipTheirPercent;
	@Column(name = "VipOurPercent", precision = 22)
	private Double					vipOurPercent;
	@Column(name = "VipClientPercent", precision = 22)
	private Double					vipClientPercent;
	@Column(name = "MTSPrice", precision = 22)
	private Double					mTSPrice;
	@Column(name = "TelenorPrice", precision = 22)
	private Double					telenorPrice;
	@Column(name = "VIPPrice", precision = 22)
	private Double					vIPPrice;
	@Column(name = "MtsSendingId", length = 128)
	private String					mtsSendingId;
	@JoinColumn(name = "ServiceId", referencedColumnName = "Id", nullable = false)
	@ManyToOne(optional = false)
	private Service					service;
	@OneToMany(mappedBy = "serviceChargingCategory")
	private List<PaymentInvoice>	paymentInvoiceList;

	public ServiceChargingCategory() {
	}

	public ServiceChargingCategory( Long id ) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public void setId( Long id ) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName( String name ) {
		this.name = name;
	}

	public void setSubscription( Boolean subscription ) {
		this.subscription = subscription;
	}

	public Boolean getSubscription() {
		return subscription;
	}

	public String getMTSChargingCode() {
		return mTSChargingCode;
	}

	public void setMTSChargingCode( String mTSChargingCode ) {
		this.mTSChargingCode = mTSChargingCode;
	}

	public String getVipChargingCode() {
		return vipChargingCode;
	}

	public void setVipChargingCode( String vipChargingCode ) {
		this.vipChargingCode = vipChargingCode;
	}

	public String getTelenorChargingCode() {
		return telenorChargingCode;
	}

	public void setTelenorChargingCode( String telenorChargingCode ) {
		this.telenorChargingCode = telenorChargingCode;
	}

	public String getTelenorServiceName() {
		return telenorServiceName;
	}

	public void setTelenorServiceName( String telenorServiceName ) {
		this.telenorServiceName = telenorServiceName;
	}

	public String getMTSChargingCodeDesc() {
		return mTSChargingCodeDesc;
	}

	public void setMTSChargingCodeDesc( String mTSChargingCodeDesc ) {
		this.mTSChargingCodeDesc = mTSChargingCodeDesc;
	}

	public String getVipChargingCodeDesc() {
		return vipChargingCodeDesc;
	}

	public void setVipChargingCodeDesc( String vipChargingCodeDesc ) {
		this.vipChargingCodeDesc = vipChargingCodeDesc;
	}

	public String getTelenorChargingCodeDesc() {
		return telenorChargingCodeDesc;
	}

	public void setTelenorChargingCodeDesc( String telenorChargingCodeDesc ) {
		this.telenorChargingCodeDesc = telenorChargingCodeDesc;
	}

	public Double getMTSTheirPercent() {
		return mTSTheirPercent;
	}

	public void setMTSTheirPercent( Double mTSTheirPercent ) {
		this.mTSTheirPercent = mTSTheirPercent;
	}

	public Double getMTSOutPercent() {
		return mTSOutPercent;
	}

	public void setMTSOutPercent( Double mTSOutPercent ) {
		this.mTSOutPercent = mTSOutPercent;
	}

	public Double getMTSClientPercent() {
		return mTSClientPercent;
	}

	public void setMTSClientPercent( Double mTSClientPercent ) {
		this.mTSClientPercent = mTSClientPercent;
	}

	public Double getTelenorTheirPercent() {
		return telenorTheirPercent;
	}

	public void setTelenorTheirPercent( Double telenorTheirPercent ) {
		this.telenorTheirPercent = telenorTheirPercent;
	}

	public Double getTelenorOurPercent() {
		return telenorOurPercent;
	}

	public void setTelenorOurPercent( Double telenorOurPercent ) {
		this.telenorOurPercent = telenorOurPercent;
	}

	public Double getTelenorClientPercent() {
		return telenorClientPercent;
	}

	public void setTelenorClientPercent( Double telenorClientPercent ) {
		this.telenorClientPercent = telenorClientPercent;
	}

	public Double getVipTheirPercent() {
		return vipTheirPercent;
	}

	public void setVipTheirPercent( Double vipTheirPercent ) {
		this.vipTheirPercent = vipTheirPercent;
	}

	public Double getVipOurPercent() {
		return vipOurPercent;
	}

	public void setVipOurPercent( Double vipOurPercent ) {
		this.vipOurPercent = vipOurPercent;
	}

	public Double getVipClientPercent() {
		return vipClientPercent;
	}

	public void setVipClientPercent( Double vipClientPercent ) {
		this.vipClientPercent = vipClientPercent;
	}

	public Double getMTSPrice() {
		return mTSPrice;
	}

	public void setMTSPrice( Double mTSPrice ) {
		this.mTSPrice = mTSPrice;
	}

	public Double getTelenorPrice() {
		return telenorPrice;
	}

	public void setTelenorPrice( Double telenorPrice ) {
		this.telenorPrice = telenorPrice;
	}

	public Double getVIPPrice() {
		return vIPPrice;
	}

	public void setVIPPrice( Double vIPPrice ) {
		this.vIPPrice = vIPPrice;
	}

	public Service getService() {
		return service;
	}

	public void setService( Service service ) {
		this.service = service;
	}

	public List<PaymentInvoice> getPaymentInvoiceList() {
		return paymentInvoiceList;
	}

	public void setPaymentInvoiceList( List<PaymentInvoice> paymentInvoiceList ) {
		this.paymentInvoiceList = paymentInvoiceList;
	}
	
	public String getMtsSendingId() {
		return mtsSendingId;
	}
	
	public void setMtsSendingId( String mtsSendingId ) {
		this.mtsSendingId = mtsSendingId;
	}
	

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (id != null ? id.hashCode() : 0);
		return hash;
	}

	@Override
	public boolean equals( Object object ) {
		if (!(object instanceof ServiceChargingCategory)) {
			return false;
		}
		ServiceChargingCategory other = (ServiceChargingCategory) object;
		if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals( other.id ))) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "com.klikmee.sms.core.entities.ServiceChargingCategory[id=" + id + "]";
	}

}
